package nodes.binary;

import nodes.AbstractNode;
import nodes.ConstantNode;
import model.Model;

/**
 * Used for representing multiplication in the expression tree
 * 
 * @author Andrew Patterson
 */
public class MultiplyNode extends AbstractBinaryNode
{

    public MultiplyNode (Model model)
    {
        super(model);
        myName = syntaxBundle.getString("multiplication_label");
    }


    public AbstractNode evaluate ()
    {
        return new ConstantNode(myLeft.evaluate().getValue() * myRight.evaluate().getValue());
    }

}
